<script type="text/javascript">
  function change(arg1)
  {
    arg1 = 10;
    document.write("function arg1 value is: " + arg1 + "<br />");
  }
  var x = 5;
  document.write("before function call x value is: " + x + "<br />");
  change(x);
  document.write("after function call x value is: " + x + "<br />");
</script>
